package com.shujia.day06.homework;

public class H5Union {
    public static void main(String[] args) {
        int[] arr1 = {1, 7, 9, 11, 13, 15, 17, 19};
        int[] arr2 = {2, 4, 6, 8, 10};

        int[] newArr = new int[arr1.length + arr2.length];

        //相当于一个指针
        int newArrIndex = 0;
        //赋值
        for (int elem : arr1) {
            newArr[newArrIndex] = elem;
            newArrIndex += 1;
        }
        for (int elem : arr2) {
            newArr[newArrIndex] = elem;
            newArrIndex += 1;
        }
        Tool.bubbling(newArr);

    }
}
